<?php
echo "<h1>个人信息</h1>";
session_start();
$name=$_SESSION["name"];
if($name){
	$db = new PDO("mysql:host=127.0.0.1;dbname=scholl;charset=utf8","root","123456");
	$sql="select * from stu where name=:name";
	$sth=$db->prepare($sql);
	$sth->bindParam(':name', $name, PDO::PARAM_STR);
	$ret=$sth->execute();
	$arr=$sth->fetchAll(PDO::FETCH_NUM);
	foreach($arr[0] as $item){
	    echo $item."<br/>";
	}
}else{
		header("Location:PDOdenglu.php");
	}
 
?>